package com.itany.boot.nmms.service;

import com.itany.boot.nmms.entity.Product;
import com.itany.boot.nmms.exception.GetSerialNoException;
import com.itany.boot.nmms.exception.ProductExistsException;
import com.itany.boot.nmms.exception.RequestParamsException;
import org.apache.tomcat.util.http.fileupload.FileUploadException;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface ProductService {
    void add(String name, String price, String productType, MultipartFile file, HttpSession session) throws RequestParamsException, FileUploadException, GetSerialNoException, ProductExistsException;

    List<Product> findAll();

    Product findById(String id) throws RequestParamsException;

    void update(String id, String name, String price, String productType, MultipartFile file, HttpSession session) throws RequestParamsException, ProductExistsException, FileUploadException;

    void removeById(String id) throws RequestParamsException;
}
